//
//  AboutAppViewController.m
//  HTP
//
//  Created by 陈钱钿 on 15/11/3.
//  Copyright © 2015年 nit. All rights reserved.
//

#import "AboutAppViewController.h"

@interface AboutAppViewController ()

@end

@implementation AboutAppViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = RGBCOLOR(233.0, 233.0, 233.0, 1);
    [self addCustomTitleWithTitle:@"关于青苗"];
    [self addCustomBackBase];
    [self initUI];
}

- (void)viewWillAppear:(BOOL)animated {
    
}
//绘制UI
- (void)initUI {
    UIImageView *logo = [[UIImageView alloc] initWithFrame:CGRectMake((ScreenWidth-150)/2, ScreenHeihgt/10, 150, 45)];
    logo.image = [UIImage imageNamed:@"logo_set"];
    [self.view addSubview:logo];
    
    UILabel *appName = [self LabelWithFrame:CGRectMake(0, CGRectGetMaxY(logo.frame)+ScreenHeihgt/10, ScreenWidth, 44) fontSize:18.0 text:@"青苗家教  V1.0.0" color:nil];
    UILabel *tip = [self LabelWithFrame:CGRectMake(0, CGRectGetMaxY(appName.frame)+10, ScreenWidth, 40) fontSize:14.0 text:@"当前已经是最新版本" color:[UIColor grayColor]];
    
    UIButton *gradeBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(tip.frame)+10, ScreenWidth, 44)];
    [gradeBtn setBackgroundColor:[UIColor whiteColor]];
    [gradeBtn setTitle:@"去评分" forState:UIControlStateNormal];
    [gradeBtn setTitleColor:[UIColor orangeColor] forState:UIControlStateNormal];
    [self.view addSubview:gradeBtn];
    
    [self LabelWithFrame:CGRectMake(0, ScreenHeihgt - NavHe - 60, ScreenWidth, 25) fontSize:15.0 text:@"学吧教育科技有限公司  版权所有" color:nil];
    [self LabelWithFrame:CGRectMake(0, ScreenHeihgt - NavHe - 30, ScreenWidth, 15) fontSize:11.0 text:@"Copyright©2015" color:nil];

}
//TODO:初始化Label的封装
- (UILabel *)LabelWithFrame:(CGRect)frame fontSize:(CGFloat)size text:(NSString *)text color:(UIColor *)color {
    UILabel *label = [[UILabel alloc] initWithFrame:frame];
    label.text = text;
    label.textAlignment = NSTextAlignmentCenter;
    label.font = [UIFont systemFontOfSize:size];
    label.textColor = color;
    [self.view addSubview:label];
    return label;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
